face

 

Face sets a turtle’s heading to point towards another specific agent. Face is usually used to point a turtle towards another turtle or a specific patch. For example, if two turtles are on opposite edges of a model, ask one-of turtles [ face other-turtle ] will turn the turtle to face the other turtle. ask turtles [ face patch 0 0 ] will turn all turtles to face the center of the model.

 

Try it Yourself

 
 
 
 
 
 
 

What's next?

Once you mastered the face primitive, don't stop there. Check out the resources below to improve your NetLogo skills.

 
Published NetLogo models that use the face primitive:
 
 
Similar primitives:
towards

Reports the angle of the caller towards an agent.

Read more
facexy

sets the turtle’s heading towards the patch (x,y)

Read more
right

Turn a certain amount of degrees to the right.

Read more
 
Learn another primitive